package(default_visibility = ["//visibility:public"])

licenses(["notice"])

java_library(
    name = "web_push_hybrid_decrypt",
    srcs = ["WebPushHybridDecrypt.java"],
    deps = [
        ":web_push_constants",
        ":web_push_util",
        "@tink_java//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
    ],
)

java_library(
    name = "web_push_util",
    srcs = ["WebPushUtil.java"],
    deps = [
        ":web_push_constants",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:bytes",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:hkdf",
    ],
)

java_library(
    name = "web_push_constants",
    srcs = ["WebPushConstants.java"],
    deps = ["@tink_java//src/main/java/com/google/crypto/tink/subtle:elliptic_curves"],
)

java_library(
    name = "web_push_hybrid_encrypt",
    srcs = ["WebPushHybridEncrypt.java"],
    deps = [
        ":web_push_constants",
        ":web_push_util",
        "@tink_java//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:random",
        "@tink_java//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
    ],
)
